<template>
  <el-config-provider :locale="i18n">
    <router-view></router-view>
  </el-config-provider>
</template>
<script setup lang="ts">
import zhCn from "element-plus/es/locale/lang/zh-cn";
import enUs from "element-plus/es/locale/lang/en";
import $ from "jquery";
import { computed, getCurrentInstance, onMounted } from "vue";
const instance: any = getCurrentInstance();

const i18n = computed(() => {
  let localeLang = zhCn;
  if (instance.proxy.$i18n.locale === "en") {
    localeLang = enUs;
  }
  return localeLang;
});
onMounted(() => {
  $("#title-id").text(instance.proxy.$t("login.title"));
});
</script>
<style scoped></style>
<style>
html,
body,
#app {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
</style>
